import {request} from '../../network/index'
Component({
	/**
	 * 组件的属性列表
	 */
	properties: {
		radioBanner:{
			type:Array,
			value:[]
		},
		recommend:{
			type:Array,
			value:[]
		},
		dayRecommend:{
			type:Array,
			value:[]
		},
		hotRedio:{
			type:Array,
			value:[]
		},
		pay:{
			type:Array,
			value:[]
		}
	},
	/**
	 * 组件的初始数据
	 */
	data: {

	},

	/**
	 * 组件的方法列表
	 */
	methods: {
		async	toDetail(event){
			let id = event.currentTarget.dataset.id
			let detail = await request('/dj/program/detail',{id:id})
			console.log(detail);
		},
		loading(){
			this.triggerEvent('load')
		},
		toRadioDetail(event){
			let id = event.currentTarget.dataset.id
			console.log(id);
			wx.navigateTo({
				url: `/pages/radioDetail/radioDetail?id=${id}`,
			})
		}
	}
})
